﻿#ifndef FUNDINFODOCKWIDGET_H
#define FUNDINFODOCKWIDGET_H
#include<QDockWidget>
class MainWindow;
class FindFund;
class QButtonGroup;
class QPushButton;
class QLabel;
//基金信息
class FundInfoDockWidget :public QDockWidget
{
	Q_OBJECT
public:
	explicit FundInfoDockWidget(FindFund* Fund, MainWindow* parent = nullptr);
	void setButtonEnabled(const bool flag);
signals:
	//发送信息到状态栏显示
	void sendMessage(const QString& info, const int timeout = 0);
public slots:
	//接收到信息后初始化
	void init();
	//按钮触发查询
	void ButtonFindFundSlots(QPushButton* button);
	//基金查询结果接收转发表格
	void resultToTable(int val);
	//将输出导出到本地文件
	void SaveFile();
	//读取文件数据到内存中
	void readFile();
	//表格数据显示隐藏
	void TableHidden();
	//将数据发送到表格显示
	void showTable();
protected:
	//void resizeEvent(QResizeEvent* event)override;
private:
	FindFund* m_FindFund = nullptr;
	QLabel* m_Label = nullptr;
	QButtonGroup* m_ButtonGroup = nullptr;
	QPushButton* m_ButtonHidden = nullptr;
};
#endif 
